<%--
  Created by IntelliJ IDEA.
  User: irinush
  Date: 2/26/12
  Time: 2:39 PM
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
  <title>My dream machine</title>
  <link rel=StyleSheet href="../css/style.css" type="text/css">
</head>
<body>

<div class="body">
    <p>Numarul de vise : ${dreams.size()}</p>
    <h2>List of all the dreams:</h2>
    <% dreams.each{ dream -> %>
    <p>    Title : ${dream.name} </p>
    <p>    Content : ${dream.content} </p>
    <p>    Author :${dream.author} </p>
    <%}%>
    <g:link url="[action: 'showCreate', controller: 'dream']">Create dream</g:link>

</div>
</body>
</html>